1. Field of the Invention
The present invention relates to a memory swap management method and apparatus that virtually store processes using a primary storage device and a secondary storage device in an information processing apparatus that executes jobs comprised of processes, as well as a computer-readable storage medium storing a program for implementing the method.
2. Description of the Related Art
Conventionally, there has been known a memory swap management method that uses a virtual storage system and controls swapping of memory areas in information processing apparatuses such as a multifunctional peripheral having a variety of functions such as copying, printing, and faxing.
In the method using the virtual storage system, a memory area not less than the memory capacity of real memory in a primary storage device can be managed using a secondary storage device. In a case where a memory area not less than the memory capacity of real memory is used, swap processing is carried out in which contents of the memory area are temporarily saved (swapped out) in a storage area of, for example, an HDD (hard disk drive) as the secondary storage device. The swap processing requires data transfer between real memory and an HDD, and hence when the swap processing occurs, the start of execution of the next process is delayed due to the swap processing.
Thus, as an improvement to make the swap processing more efficient, a method in which a plurality of pages are collectively swapped out according to an active state of pages at swap-out of a process is disclosed in Japanese Laid-Open Patent Publication (Kokai) No. H05-88984.
Also, conventionally, there has been the problem that when a process swapped out once from real memory is required to run again, response is not good because it takes time to swap the process into the real memory.
To cope with this problem, there is scope for considering the following attempt so as to realize good response of a process to be executed next. First, information on swapped-out areas is managed in list form. Then, when there is a free space in the real memory while a system is idling, processes are sequentially swapped in from a most recently swapped out process so as to realize good response of a process to be executed next.
According to the method disclosed in Japanese Laid-Open Patent Publication (Kokai) No. H05-88984, however, swapping may frequently occur during execution of processes, and hence a time to start executing a process cannot be shortened although a time can be shortened by combining a plurality of swap-out processes.
Moreover, in the attempt being considered as described above, a most recently swapped out process does not always have a high possibility of being executed next. For this reason, it is highly likely that at a time of execution of a process, swap processing occurs with the process being not present in the real memory, which is not efficient.
Incidentally, in information processing apparatuses such as multifunctional peripherals, functions such as copying, printing, faxing, and scanning are executed as jobs according to instructions as distinct from general-purpose PCs (personal computers). In execution of each job, only processes constituting the job are executed. Conventionally, even in such an environment in which only specific processes are frequently executed according to a status of use by a user, optimization of swap processing according to the status of use by the user has not been practiced. For this reason, particularly in apparatuses of this type, there is scope for improvement in inhibiting occurrence of swap processing immediately before execution of a job and thus increasing a processing speed of the apparatus.